package com.jdz.gxq.info.admin.labordisputes.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.jdz.gxq.info.admin.labordisputes.service.LabordisputesService;
import com.jdz.gxq.info.common.action.CommonAction;

public class DeleteLabordisputesAction extends CommonAction {

	private LabordisputesService labordisputesService = null;
	 
	public ActionForward doExecute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws java.lang.Exception {
		
		String idStr = request.getParameter("id");
		
		String[] ids = idStr.split(",");
		
		for (String id : ids) {
			labordisputesService.deleteLabordisputes(Integer.parseInt(id));
		}

		return mapping.findForward("success");
	}

	public void setLabordisputesService(LabordisputesService labordisputesService) {
		this.labordisputesService = labordisputesService;
	}
}

